#!/bin/bash
#

readonly functions_name="public_functions" #文件名称
readonly functions_url="$(find / -path /proc -prune -o -name $functions_name -print)" #获取文件路径

if [[ -n $functions_url ]]; then #查找函数文件并加载

    for i in $functions_url; do . $i; done
else
    echo "Not fount $functions_name"
fi


logY "-------------------- cpu top 10 --------------------"
ps -eo pid,pcpu,pmem,args --sort=-pcpu | head -n 11

logY "-------------------- memory top 10 -----------------"
ps -eo pid,pcpu,pmem,args --sort=-pmem | head -n 11
